home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpuzzles.3 / xpuzzles / xpuzzles-5.3.1 / xpuzzles.Makefile next >
Makefile  |  1996-04-09  |  6KB  |  312 lines

  1. #
  2. #       Makefile
  3. #
  4. ###
  5. #
  6. #  Copyright (c) 1994 - 96    David Albert Bagley, bagleyd@hertz.njit.edu
  7. #
  8. #                   All Rights Reserved
  9. #
  10. #  Permission to use, copy, modify, and distribute this software and
  11. #  its documentation for any purpose and without fee is hereby granted,
  12. #  provided that the above copyright notice appear in all copies and
  13. #  that both that copyright notice and this permission notice appear in
  14. #  supporting documentation, and that the name of the author not be
  15. #  used in advertising or publicity pertaining to distribution of the
  16. #  software without specific, written prior permission.
  17. #
  18. #  This program is distributed in the hope that it will be "useful",
  19. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21. #
  22.  
  23. # if this fails to build one may have to edit the individual Imakefiles
  24. # Please consult the individual README's.
  25. # This Makefile is relatively new, so use with caution!
  26. # This will not build the motif versions, see individual Imakefiles.
  27. # Also remember to put the appropriate puzzle.ad file in $HOME/puzzle
  28. # or where ever you normally put these preferences.
  29.  
  30. # After ftping all the *.tar.gz files you want (each program is independent)
  31. #    make -f xpuzzles.Makefile gunzip  # beware: destroys the original files
  32. #    make -f xpuzzles.Makefile xmkmf
  33. #    make -f xpuzzles.Makefile
  34. #    make -f xpuzzles.Makefile run     # this cycles through all programs
  35.  
  36. #SHELL=/bin/sh
  37.  
  38. XLOCK=more
  39. #STUFF=abacus dial threed
  40. ROTATIONAL=rubik skewb dino pyraminx oct mball
  41. SLIDING=cubes triangles hexagons mlink
  42. PUZZLES=${ROTATIONAL} ${SLIDING}
  43. ALTRIS=tetris tertris hextris welltris
  44.  
  45. #PRE=xlock
  46. #NAME=xlockmore.
  47. PRE=x
  48. NAME=xpuzzles.
  49. #PRE=al
  50. #NAME=altris.
  51.  
  52. PROGRAMS=${PUZZLES}
  53.  
  54. # Used by me to zip and write and read from my floppy drive
  55. UNIXDIR=${HOME}/net/pending
  56. DOSDIR=/dosa
  57. # mntflop is a mount floppy disk utility for users that I maintain for SunOS,
  58. # Solaris, and Linux.  If there is interest, I will make it publicly available.
  59. # If there is something out there already, let me know.
  60.  
  61. all:
  62.     for i in ${PROGRAMS}; do\
  63.         if [ -d ${PRE}$${i} ]; then\
  64.             cd ${PRE}$${i};\
  65.             make;\
  66.             cd ..;\
  67.         fi;\
  68.     done
  69.  
  70. all.xm:
  71.     for i in ${PROGRAMS}; do\
  72.         if [ -d ${PRE}$${i} ]; then\
  73.             cd ${PRE}$${i};\
  74.             make all.xm;\
  75.             cd ..;\
  76.         fi;\
  77.     done
  78.  
  79. xmkmf:
  80.     for i in ${PROGRAMS}; do\
  81.         if [ -d ${PRE}$${i} ]; then\
  82.             cd ${PRE}$${i};\
  83.             xmkmf;\
  84.             make clean;\
  85.             cd ..;\
  86.         fi;\
  87.     done
  88.  
  89. linux:
  90.     for i in ${PROGRAMS}; do\
  91.         if [ -d ${PRE}$${i} ]; then\
  92.             cd ${PRE}$${i};\
  93.             cp Makefile.linux Makefile;\
  94.             make clean;\
  95.             cd ..;\
  96.         fi;\
  97.     done
  98.  
  99. sun:
  100.     for i in ${PROGRAMS}; do\
  101.         if [ -d ${PRE}$${i} ]; then\
  102.             cd ${PRE}$${i};\
  103.             cp Makefile.sun Makefile;\
  104.             make clean;\
  105.             cd ..;\
  106.         fi;\
  107.     done
  108.  
  109. acc:
  110.     for i in ${PROGRAMS}; do\
  111.         if [ -d ${PRE}$${i} ]; then\
  112.             cd ${PRE}$${i};\
  113.             cp Makefile.acc Makefile;\
  114.             make clean;\
  115.             cd ..;\
  116.         fi;\
  117.     done
  118.  
  119. gcc:
  120.     for i in ${PROGRAMS}; do\
  121.         if [ -d ${PRE}$${i} ]; then\
  122.             cd ${PRE}$${i};\
  123.             cp Makefile.gcc Makefile;\
  124.             make clean;\
  125.             cd ..;\
  126.         fi;\
  127.     done
  128.  
  129. lint:
  130.     for i in ${PROGRAMS}; do\
  131.         if [ -d ${PRE}$${i} ]; then\
  132.             cd ${PRE}$${i};\
  133.             make lint;\
  134.             cd ..;\
  135.         fi;\
  136.     done
  137.  
  138. run:
  139.     for i in ${PROGRAMS}; do\
  140.         if [ -d ${PRE}$${i} ]; then\
  141.             cd ${PRE}$${i};\
  142.             ./${PRE}$${i};\
  143.             cd ..;\
  144.         fi;\
  145.     done
  146.  
  147. run.xm:
  148.     for i in ${PROGRAMS}; do\
  149.         if [ -d ${PRE}$${i} ]; then\
  150.             cd ${PRE}$${i};\
  151.             ./xm$${i};\
  152.             cd ..;\
  153.         fi;\
  154.     done
  155.  
  156. clean:
  157.     for i in ${PROGRAMS}; do\
  158.         if [ -d ${PRE}$${i} ]; then\
  159.             cd ${PRE}$${i};\
  160.             xmkmf;\
  161.             make clean;\
  162.             cd ..;\
  163.         fi;\
  164.     done
  165.  
  166. clean.all:
  167.     for i in ${PROGRAMS}; do\
  168.         if [ -d ${PRE}$${i} ]; then\
  169.             cd ${PRE}$${i};\
  170.             xmkmf;\
  171.             make clean.all;\
  172.             cd ..;\
  173.         fi;\
  174.     done
  175.  
  176. fast.clean:
  177.     for i in ${PROGRAMS}; do\
  178.         if [ -d ${PRE}$${i} ]; then\
  179.             cd ${PRE}$${i};\
  180.             make -f Makefile.std clean;\
  181.             cd ..;\
  182.         fi;\
  183.     done
  184.  
  185. fast.clean.all:
  186.     for i in ${PROGRAMS}; do\
  187.         if [ -d ${PRE}$${i} ]; then\
  188.             cd ${PRE}$${i};\
  189.             make -f Makefile.std clean.all;\
  190.             cd ..;\
  191.         fi;\
  192.     done
  193.  
  194. tar:
  195.     for i in ${PROGRAMS}; do\
  196.         if [ -d ${PRE}$${i} ]; then\
  197.             cd ${PRE}$${i};\
  198.             make -f Makefile.std tar;\
  199.             cd ..;\
  200.         fi;\
  201.     done
  202.  
  203. compress:
  204.     for i in ${PROGRAMS}; do\
  205.         if [ -d ${PRE}$${i} ]; then\
  206.             cd ${PRE}$${i};\
  207.             make -f Makefile.std compress;\
  208.             cd ..;\
  209.         fi;\
  210.     done
  211.  
  212. gzip:
  213.     cp ${NAME}README ${UNIXDIR}/${NAME}README;\
  214.     cp ${NAME}Makefile ${UNIXDIR}/${NAME}Makefile;\
  215.     cp ${NAME}lsm ${UNIXDIR}/${NAME}lsm;\
  216.     for i in ${PROGRAMS}; do\
  217.         if [ -d ${PRE}$${i} ]; then\
  218.             cd ${PRE}$${i};\
  219.             make -f Makefile.std gzip;\
  220.             cd ..;\
  221.             mv ${PRE}$${i}.tar.gz ${UNIXDIR};\
  222.         fi;\
  223.     done
  224.  
  225. tgz:
  226.     mntflop -d;\
  227.     cp ${NAME}README ${DOSDIR}/${NAME}rea;\
  228.     cp ${NAME}Makefile ${DOSDIR}/${NAME}mak;\
  229.     cp ${NAME}lsm ${DOSDIR}/${NAME}lsm;\
  230.     for i in ${PROGRAMS}; do\
  231.         if [ -d ${PRE}$${i} ]; then\
  232.             cd ${PRE}$${i};\
  233.             make -f Makefile.std tgz;\
  234.             cd ..;\
  235.             cp `echo ${PRE}$${i} | cut -c1-8`.tgz ${DOSDIR};\
  236.         if [ -w ${DOSDIR}/`echo ${PRE}$${i} | cut -c1-8`.tgz ]; then\
  237.                 rm -f `echo ${PRE}$${i} | cut -c1-8`.tgz;\
  238.             fi;\
  239.         fi;\
  240.     done;\
  241.     mntflop -u;\
  242.     if [ -x /usr/bin/eject ]; then\
  243.         /usr/bin/eject floppy;\
  244.     fi
  245.  
  246. utar:
  247.     for i in ${PROGRAMS}; do\
  248.         tar xvf ${PRE}$${i}.tar;\
  249.         rm -f ${PRE}$${i}.tar;\
  250.     done
  251.  
  252. uncompress:
  253.     for i in ${PROGRAMS}; do\
  254.         uncompress ${PRE}$${i}.tar.Z;\
  255.         tar xvf ${PRE}$${i}.tar;\
  256.         rm -f ${PRE}$${i}.tar;\
  257.     done
  258.  
  259. gunzip:
  260.     for i in ${PROGRAMS}; do\
  261.         gunzip ${PRE}$${i}.tar.gz;\
  262.         tar xvf ${PRE}$${i}.tar;\
  263.         rm -f ${PRE}$${i}.tar;\
  264.     done
  265.  
  266. utgz:
  267.     for i in ${PROGRAMS}; do\
  268.         if [ -r `echo ${PRE}$${i} | cut -c1-8`.tgz ]; then\
  269.             gunzip -fN `echo ${PRE}$${i} | cut -c1-8`.tgz;\
  270.             tar xvf ${PRE}$${i}.tar;\
  271.             rm -f ${PRE}$${i}.tar;\
  272.         fi;\
  273.     done
  274.  
  275. extract:
  276.     mntflop -d;\
  277.     cp ${DOSDIR}/${NAME}rea ${NAME}README;\
  278.     cp ${DOSDIR}/${NAME}mak ${NAME}Makefile;\
  279.     cp ${DOSDIR}/${NAME}lsm ${NAME}lsm;\
  280.     chmod 600 ${NAME}README ${NAME}Makefile ${NAME}lsm;\
  281.     for i in ${PROGRAMS}; do\
  282.         if [ -r ${DOSDIR}/`echo ${PRE}$${i} | cut -c1-8`.tgz ]; then\
  283.             cp ${DOSDIR}/`echo ${PRE}$${i} | cut -c1-8`.tgz .;\
  284.         fi;\
  285.     done;\
  286.     mntflop -u;\
  287.     if [ -x /usr/bin/eject ]; then\
  288.         /usr/bin/eject floppy;\
  289.     fi
  290.  
  291. read:
  292.     for i in ${PROGRAMS}; do\
  293.         if [ -d ${PRE}$${i} ]; then\
  294.             cd ${PRE}$${i};\
  295.             more README;\
  296.             cd ..;\
  297.         fi;\
  298.     done
  299.  
  300. man:
  301.     for i in ${PROGRAMS}; do\
  302.         if [ -d ${PRE}$${i} ]; then\
  303.             cd ${PRE}$${i};\
  304.             nroff -man ${PROGRAM}.man | more;\
  305.             cd ..;\
  306.         fi;\
  307.     done
  308.  
  309. #print:
  310.  
  311. #install:
  312.